<?php

namespace App\Services;

use Illuminate\Support\Facades\Mail;

class MailService{


    public function send($toEmail, $subject = "test主题")
    {
         info('收件者的地址为：'.$toEmail);
         Mail::send('mail', ['name'=>'XXX'], function ($message) use ($toEmail, $subject){
             $to =$toEmail;
             $message->to($to)->subject($subject);
         });
    }
}
